{% load static %}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>发布文章</title>
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="{% static 'assets/i/favicon.png' %}">
    <link rel="apple-touch-icon-precomposed" href="{% static 'assets/i/app-icon72x72@2x.png' %}">
    <link rel="stylesheet" href="{% static 'assets/css/amazeui.min.css' %}" />
    <link rel="stylesheet" href="{% static 'assets/css/admin.css' %}">
    <link rel="stylesheet" href="{% static 'assets/css/app2.css' %}">
</head>
<body data-type="generalComponents">
<div class="tpl-page-container tpl-page-header-fixed">
<div class="tpl-content-page-title">写文章</div>
            <div class="tpl-portlet-components">
                <div class="tpl-block">
                    <div class="am-g">
                        <div class="tpl-form-body tpl-form-line">
                            <form method="post"  enctype="multipart/form-data" class="am-form tpl-form-line-form">
                                {% csrf_token %}
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">标题 <span class="tpl-form-line-small-title">Title</span></label>
                                    <div class="am-u-sm-9">
                                        <input name="title" type="text" class="tpl-form-input" placeholder="请输入标题文字" />
                                        <small>请填写标题文字10-20字左右。</small>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label class="am-u-sm-3 am-form-label">简介 <span class="tpl-form-line-small-title">Brief</span></label>
                                    <div class="am-u-sm-9">
                                        <input name="brief" type="text" placeholder="请输入文章简介" />
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-phone" class="am-u-sm-3 am-form-label">话题 <span class="tpl-form-line-small-title">Topic</span></label>
                                    <div class="am-u-sm-9">
                                        <select name="topic_id" data-am-selected="{searchBox: 1}">
                                            {% for i in topic %}
                                                <option value="{{ i.id }}">{{ i.tname }}</option>
                                            {% endfor %}</select>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-weibo" class="am-u-sm-3 am-form-label">封面图 <span class="tpl-form-line-small-title">Images</span></label>
                                    <div class="am-u-sm-9">
                                        <div class="am-form-group am-form-file">
                                            <div class="tpl-form-file-img"></div>
                                            <button type="button" class="am-btn am-btn-danger am-btn-sm"><i class="am-icon-cloud-upload"></i> 添加封面图片</button>
                                            <input name="up_image" id="doc-form-file" type="file" multiple>
                                        </div>

                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <label for="user-intro" class="am-u-sm-3 am-form-label">文章内容</label>
                                    <div class="am-u-sm-9">
                                        <textarea name="content" class="" rows="10" id="user-intro" placeholder="请输入文章内容"></textarea>
                                    </div>
                                </div>
                                <div class="am-form-group">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                                    </div>
                                </div>
                            </form>

                        </div>
                    </div>
                </div>
            </div>
    </div>
    <script src="{% static 'assets/js/jquery.min.js' %}"></script>
    <script src="{% static 'assets/js/amazeui.min.js' %}"></script>
    <script src="{% static 'assets/js/app.js' %}"></script>
<script src="{% static 'tiny_mce/tiny_mce.js' %}"></script>
<script>
    tinyMCE.init({
        'mode':'textareas',
        'width':1000,
        'height':500
    })
</script>
</body>
</html>